package com.aabte.design2.behavioral.chain.v2;

import com.aabte.design2.behavioral.chain.Request;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class UsernameFilter implements Filter {
    @Override
    public void doFilter(Request request, Chain chain) {
        if (null != request.getUsername()) {
            chain.doFilter(request);
        } else {
            System.out.println("username is null, bad request.");
        }
    }
}
